package homework;

import java.util.List;
import java.util.Arrays;
import java.util.HashMap;
import java.util.stream.Collectors;

public class Work5 {
	public static void main(String[] args) {
		int[] arr1={1,2,3,4,6};
		int[] arr2={3,4,5,2};
		List<Integer> collect = Arrays.stream(arr1).boxed().collect(Collectors.toList());
		List<Integer> collect1 = Arrays.stream(arr2).boxed().collect(Collectors.toList());
		
		HashMap<Integer, Integer> countMap = new HashMap<>();
		collect.stream().forEach(s->countMap.put(s, countMap.getOrDefault(s, 0) + 1));
		collect1.stream().forEach(s->countMap.put(s, countMap.getOrDefault(s, 0) + 1));
		countMap.entrySet().stream().filter(s->s.getValue()==1)
		.map(s->s.getKey()).collect(Collectors.toList()).forEach(System.out::print);
	}
}
